package com.wrk._1_语法._03_分支;

public class _001_数值交换2 {
    public static void main(String[] args) {
        int num1 = 2;
        int num2 = 5;
        int num3 = 9;
        //定义变量
        int h;
        //if语句进行判断
        if (num1<num2){
            h = num1;
            num1 = num2;
            num2 = h;
        }if (num1<num3){
            h = num1;
            num1 = num3;
            num3 = h;
        }if (num2<num3){
            h = num2;
            num2 = num3;
            num3 = h;
        }
        System.out.println("num1:"+num1);
        System.out.println("num2:"+num2);
        System.out.println("num3:"+num3);
    }
}
